﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using BCCommon.Enums.Chats;

namespace BCEntity.Chats
{
    [Table("chat_messagereceiver")]
    public class MessageReceiverEntity
    {
        /// <summary>
        /// 消息接收者编号。
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public long MessageReceiverId { get; set; }

        /// <summary>
        /// 会话编号。
        /// </summary>
        public long ThreadId { get; set; }

        /// <summary>
        /// 消息编号。
        /// </summary>
        public long MessageId { get; set; }

        /// <summary>
        /// 接收方式，参见 <see cref="MessageReceiveType"/>。
        /// </summary>
        public string ReceiveType { get; set; }

        /// <summary>
        /// 接收用户编号。
        /// </summary>
        public string ReceiveUserId { get; set; }

        /// <summary>
        /// 发送时间。
        /// </summary>
        public DateTime? SendTime { get; set; }

        /// <summary>
        /// 回执时间。
        /// </summary>
        public DateTime? ReceiptTime { get; set; }

        /// <summary>
        /// 阅读时间。
        /// </summary>
        public DateTime? ReadTime { get; set; }

        /// <summary>
        /// 已删除。
        /// </summary>
        public bool Deleted { get; set; }

        /// <summary>
        /// 创建时间。
        /// </summary>
        public DateTime CreateTime { get; set; }
    }
}
